function [bestScheduledTargets, bestScheduledPriorities, status] = SCP_LocalSearch(PQ, s1OlTargets, s1OlBins, s2OlTargets, s2OlBins, scheduledTargets, scheduledPriorities)

randomTargetList = randperm(PQ_Size(PQ));

origScheduledTargets = scheduledTargets;
origScheduledPriorities = scheduledPriorities;

bestScheduledTargets = scheduledTargets;
bestScheduledPriorities = scheduledPriorities;

for p = 1:PQ_Priorities(PQ)
  priority = PQ_Priorities(PQ)+1-p;
  
  for target = 1:size(randomTargetList, 2)
    [Task, status] = PQ_Fetch_Task(PQ, randomTargetList(target), PQ_Priorities(PQ)+1-p);
    if ~status
      continue;
    end
    
    target_id = Task.id;
    if any(origScheduledTargets == target_id)
      continue;
    end
    
    scheduledTargets = target_id;
    scheduledPriorities = priority;
    
    [scheduledTargets, scheduledPriorities, status] = SCP_Mutation(origScheduledTargets, origScheduledPriorities, s1OlTargets, s1OlBins, s2OlTargets, s2OlBins, scheduledTargets, scheduledPriorities);
    if ~status
      continue;
    end
    
    [scheduledTargets, scheduledPriorities, status] = SCP_Construction(PQ, s1OlTargets, s1OlBins, s2OlTargets, s2OlBins, scheduledTargets, scheduledPriorities);
    if ~status
      continue;
    end
  
    [bestScheduledTargets, bestScheduledPriorities, status] = GRASP_UpdateSolution(PQ, bestScheduledTargets, bestScheduledPriorities, scheduledTargets, scheduledPriorities);
    if ~status
      continue;
    end
  end
end

status = 1;
end % function